package com.alon.spring01.common.exception;

/**
 * @program: spring01
 * @description: 自定义Exception
 * @author: yulongguang
 * @create: 2019-07-25 11:11
 **/
public class MyException extends RuntimeException {

    /**
     * 异常状态码
     */
    private String code;
    /**
     * 异常信息
     */
    private String message;
    /**
     * 发生的方法
     */
    private String method;
    /**
     * 描述
     */
    private String desc;

    public MyException(String code, String message, String method, String desc) {
        this.code = code;
        this.message = message;
        this.method = method;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
